Welding robot

ABSTRACT

A teaching robot including a sensor having a size and a shape which does not deteriorate the accessibility to a workpiece, and carrying out self-teaching of an operation program without execution of actual welding, includes a rotating and sweeping device attached to the distal end of a robot arm, for rotating a noncontact distance sensor; a rotating phase detecting device for detecting rotating phase data; a signal waveform processing device for extracting a feature point from a signal waveform in accordance with distance data to an objective workpiece and rotating phase data; a relationship calculating device for calculating an actual relationship between the objective workpiece and the distal end of the robot arm from feature points extracted from the signal waveform; a relationship setting and storing device for previously setting and storing a reference relationship; and a control device for autonomously moving the robot arm so that the actual relationship calculated by the relationship calculating device coincides with the reference relationship stored in the relationship setting and storing device.

TECHNICAL FIELD OF THE INVENTION

The present invention relates to a teaching play-back type welding robotwhich automatically recognizes a welding point on a workpiece to bewelded and the posture of the later so as to perform self-teaching of anoperation program while it autonomously follows a welding line.

BACKGROUND OF THE INVENTION

Most of presently available welding robots are of a teaching play-backtype. These known robots have required that several operation programsbe taught to a single robot in order to cope with multi-kind and smallquantity production. Further, it has been desired to provide measuresfor reducing the manhours of effective teaching of an operation programto an welding robot in view of a lack of skilled workers for teaching arobot.

A teaching method which is widely used, in general, at the present time,requires that a teaching worker use manipulating switches in amanipulation box for designating a motion of a robot so as to cause therobot to take a predetermined motion while the teaching worker monitorsthe motion of the robot in order to teach an operation program. Thismethod presents problems such as requiring a complex teaching operationfor a workpiece to be welded which requires a curved welding line,direction change or the like, and further requires repetitions trialoperations in order to obtain a desired motion for the robot.Accordingly, it takes a long time for the teaching of the robot.

In view of the above, various teaching measures that don't use amanipulation box as mentioned above, have been proposed, and have beenpractically used.

Of the above-mentioned measures, one is the so-called off-line teachingmethod for teaching an absolute position on the coordinates set on aworking field including a robot. For example, there have been proposed amethod of teaching an absolute position with the use of computersimulation, a method in which a position teaching unit incorporatingseveral light emitting elements, instead of a torch, is moved along awelding line on a workpiece to be welded, and light emitted therefrom isdetected by image sensors fixed to a working field so as to teach arobot, as disclosed in Japanese Laid-Open Patent No. 60-136806 orJapanese Patent Publication No. 64-4875. In these methods, a high degreeof accuracy is reburied for positioning a robot. Further, theconfirmation of the presence of any interference between a robot arm, awelding torch or a welding cable and a workpiece to be welded, aperipheral jig or the like is required.

Further, there are other methods in which teaching is made while a robotis actually operated. A first one of these methods is a direct teachingmethod in which a robot sometimes detects and stores in memory itsmotion while a worker who grips a welding torch or a grip part which adummy of the torch fixed to the distal end part of a robot arm, leadsthe torch or the like so as to follow a welding line. For example,Japanese Laid-Open Patent No. 56-85106 discloses a method of detectingthe motion, in which a force detector for detecting a direction in whichthe worker leads the grip part and a force for leading the grip part isprovided, and the position and posture of the tip end of the torch iscomputed from an output signal from the detector. Since the directteaching method allows the worker to manipulate the robot with hisinstitution without being aware of the coordinates set on a robot, it iseasily accomplished by the teaching worker. However, the installed forcedetector may interfere with a workpiece or a jig so that it cannot bemanipulated. Further, certain shapes of a workpiece forces the worker totake an unreasonable posture. Further, there is a possible risk suchthat the worker may accidentally touch the robot and be harmed.

A second method allows a robot to automatically recognize a weldingstart point and a weld line with the use of a sensor so that the robotteaches while it autonomously follows the welding line. This method caneliminate the necessity of confirmation of the interference and ofcorrection to a teaching point, and eliminate the necessity of teachingwhich is performed by a worker in close proximity with a robot. Further,since the robot automatically performs positioning and sets a posturewith the use of data from the sensor, it is possible to aim atuniforming the quality of teaching without being dependent upon aworker's skill.

Means for automatically recognizing a welding start point and a weldingline, is classified mainly into two types. The first type uses adistance sensor or an image sensor utilizing a laser beam, ultrasonicwaves or the like, and the second type uses the welding work itselfincluding a welding wire, a welding arc or the like.

In general, most of the means for automatically recognizing a weldingstart point and a welding line with the use of the distance sensor orthe image sensor utilizing a laser beam, ultrasonic waves or the likerequire additional attachment of the sensor to a robot in the vicinityof a welding torch, and accordingly, the interference between the sensorand a workpiece, a jig or the like may be a hindrance, since a smallsized accurate sensor can not be obtained at the present time, andfurther, affections caused by surface conditions of a workpiece,enviromantal illumination, an ambient temperature or the like are notnegligible. Thus, there has been offered such a problem that aworkpiece, a jig or a working environment which are applicable aresubjected to great restrictions.

As disclosed in Japanese Laid-Open Patent No. 54-15441, a touch sensorusing a welding wire as a wire earth is adapted to recognize a positionon a workpiece from the position of a robot arm at a time when thewelding wire as one of opposite electrodes applied with a voltage andthe surface of the workpiece as another one of opposite electrodes makecontact with each other so as to obtain an electrical communicationduring movement of the welding wire by a robot, and with the repetitionsof the above-mentioned procedure at several points, the welding line canbe detected. However, in this procedure, the detecting action is not sofast since sensing is required at several positions for every teachingpoint, and accordingly, as the workpiece becomes more complicated anumber of teaching points increases, thus requiring longer teachingtime. Then presents such a problem that the practical usability thereofis remarkably deteriorated.

Further, as disclosed in Japanese Laid-Open Utility Model No. 54-55635,an arc sensor utilizing a welding arc is of a type that recognizes theposition of a welding line with the use of variations in a weldingcurrent signal as a data source, that is, variations in welding currentcaused by variations in the distance between a welding tip and a mothermaterial, which are in turn caused by weaving a welding torch incrossing with the welding line within the bevel of a welding joint, soas to recognize the position of the welding line. However, this methodcannot be repeated since the arc itself has to serve as a sensor, sothat the teaching must be made during an actual welding operation.Further, there have been offered problems such as the trace of a weldingline at a high speed is difficult, practical application to a lap jointof thin plates is inappropriate, the performance of the trace is greatlyaffected by welding terms, the control of the posture of a torch isdifficult and so forth.

The present invention is devised in order to solve the above-mentionedproblems, and accordingly, one object of the present invention is toprovide a sensor having a size and a shape which do not reduce theaccessibility to a workpiece, that is applicable to various workpieceshapes and various working environments, and that is capable ofautomatically recognizing the position of a welding line and the postureof a torch with respect to a workpiece at a high speed without carryingout a practical welding operation, and to provide a welding robot usingthe sensor, which can easily carry out a safe and effective teachingmethod with reduced man hours.

SUMMARY OF THE INVENTION

A welding robot according to the present invention, comprises a robotarm; a first coordinate system set to the distal end part of the robotarm; a second coordinate system set to an objective workpiece; anoncontact distance sensor attached to the distal end part of the robotarm, and adapted to measure a distance to the objective workpiece and todeliver distance data; rotating and sweeping means having its rotaryshaft fixed to the first coordinate system, for rotating and sweepingthe noncontact distance sensor; rotating phase detecting means fordetecting a rotating phase of the noncontact distance sensor anddelivering phase data; signal waveform processing means for extracting afeature point in a signal waveform obtained from the distance data andthe phase data, and delivering the distance data and the phase data atevery feature point; positional relationship calculating means forcalculating a positional relationship and a posture relationship (whichare hereinbelow denoted simply as "positional relationship") between thefirst coordinate system and the second coordinate system from datadelivered from the signal waveform processing means; a positionalrelationship setting and storing means for previously setting andstoring therein a positional relationship serving as a reference betweenthe first and second coordinate systems; and robot control means formoving the robot arm in such a way that the positional relationshipbetween the first coordinate system and the second coordinate systemwhich is calculated by the positional relationship calculating meanscoincides with the positional relationship between the first coordinatesystem and the second coordinate system which is previously set andstored in the positional relationship setting and storing means.

With the above-mentioned arrangement according to the present invention,the noncontact distance sensor is rotated and swept by the rotating andsweeping means, a feature point in a signal waveform is extracted by thesignal waveform processing means with the use of distance data to theobjective workpiece and rotating phase data, the positional relationshipbetween the first coordinate system and the second coordinate system,that is, the positions of a welding line, the workpiece and a weldingtorch and the posture of the latter, is calculated from the distancedata and the rotating phase data at every thus extracted feature pointby the positional relationship calculating means, and the robot arm ismoved by the robot control means in such a way that the thus calculatedpositional relationship coincides with the previously set and storedpositional relationship. Thus, the robot arm can be automatically movedin a desired relationship which is previously set and stored, that is,the welding torch can be set at a desired position and in a desiredposture.

Further, with the use of a capacitance type noncontact distance sensoras the above-mentioned noncontact distance sensor, it is possible toprovide a small size sensor which can perform detection with a highdegree of accuracy with no affection by a surface condition of aworkpiece, an environmental illumination, an ambient temperature or thelike.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is an external view illustrating the entire arrangement of thepresent invention;

FIG. 2 is a block diagram showing the stream of data in accordance withthe present invention:

FIG. 3 is a view illustrating a capacitance type two channel distancesensor;

FIG. 4 is a view for explaining a first coordinate system;

FIG. 5 is a view for explaining a second coordinate system;

FIG. 6 is a typical view showing such a case that a torch coordinatesystem coincides with a workpiece coordinate system;

FIG. 7 is a view showing a waveform of a sensor signal in such a casethat the torch coordinate system coincides with the workpiece coordinatesystem;

FIG. 8 is a typical view showing such a case that the torch coordinatesystem and the workpiece coordinate system are shifted from each otherin the direction of an Xt-axis;

FIG. 9 is a view showing a waveform of a sensor signal in such a casethat the torch coordinate system and the workpiece coordinate system areshifted from each other in the direction of the Xt-axis;

FIG. 10 is a typical view showing such a case that the torch coordinatesystem and the workpiece coordinate system are shifted from each otheraround a Zt-axis;

FIG. 11 is a view showing a waveform of a sensor signal in such a casethat the torch coordinate system and the workpiece coordinate system areshifted from each other around the Zt-axis;

FIG. 12 is a typical view showing such a case that the torch coordinatesystem and the workpiece coordinate system are shifted from each otherin the direction of the Zt-axis;

FIG. 13 is a view showing a waveform of a sensor signal in such a casethat the torch coordinate system and the workpiece coordinate system areshifted from each in the direction of the Zt-axis;

FIG. 14 is a typical view showing such a case that the torch coordinatesystem and the workpiece coordinate system are shifted from each otheraround a Yt-axis;

FIG. 15 is a view showing a waveform of a sensor signal in such a casethat the torch coordinate system and the workpiece coordinate system areshifted from each other around the Yt-axis;

FIG. 16(A) is a typical view showing such a case that the capacitancetype two channel distance sensor is used, and that the torch coordinatesystem and the workpiece coordinate system are shifted from each otheraround the Yt-axis:

FIG. 16(B) is an enlarged view illustrating a part of the capacitancetype distance sensor shown in FIG. 6(A) in the vicinity of the front endthereof;

FIG. 17 is a view showing a waveform of a sensor signal in such a casethat the torch coordinate system and the workpiece coordinate system areshifted from each other around Xt-axis;

FIG. 18 is a view showing a phase relationship in such a case that thetorch coordinate system and the workpiece coordinate system are shiftedfrom each other around the Xt-axis;

FIG. 19 is a view showing a waveform of a sensor signal in such a casethe torch coordinate system and the workpiece coordinate system areshifted from each other within a single scanning; and,

FIG. 20 is a perspective view illustrating a workpiece to be weldedwhich is used in an example of teaching according to the presentinvention.

DETAILED DESCRIPTION OF THE INVENTION

Detailed explanation will be hereinbelow made of the present inventionin reference to the accompanying drawings.

Referring to FIG. 1, A vertical multi-joint type robot arm 1 is attachedat its distal end with a welding torch (which will be herein denoted as"torch") 13, and a workpiece 2 has a fillet welded joint. A capacitancetype noncontact distance sensor (which will be hereinbelow denoted as"capacitance type distance sensor") 5 is attached rotatably to the tipend of the torch 13, eccentric from the center axis (Xt-axis which willbe explained later) of the torch 13, and is adapted to be rotated forscanning by a rotating and sweeping means 6 using a servomotor (which isnot shown) as a drive source, around the center axis of the torch 13 asa rotational center axis, with a predetermined radius. An encoder forcontrolling the servomotor serves as a rotating phase detecting means 7for detecting a rotating phase of the noncontact distance sensor 5,using a Yt-axial direction of a torch coordinate system 3 (FIG. 4) whichwill be hereinbelow explained, as a reference position. A signalwaveform processing means 8 obtains a signal waveform indicating arelationship between a distance and a phase, from an output signaldelivered from capacitance type distance sensor 5 and an output signalfrom the rotating phase detecting means 7, and extracts a feature pointfrom the signal waveform, with data concerning the feature point beingdelivered to a positional relationship calculating means 9. Thepositional relationship calculating means 9 calculates a positionalrelationship between first (torch) and second (workpiece) coordinatesystems 3, 4 which will be explained later.

A positional relationship setting and storing means 10 previously setsand stores therein a desired target position with respect to theworkpiece and a posture of the torch as the positional relationshipbetween the first coordinate system 3 and the second coordinate system4, and accordingly, the robot arm 1 is driven by a robot control means11 and shaft drive motors 20 attached to the robot arm 1 in such a waythat the set and stored positional relationship coincides with thepositional relationship calculated by the positional relationshipcalculating means 9. The robot control means 11 is composed of, as shownin FIG. 2, a desired movement position control means 14, a presentposition managing means 15, a third coordinate converting part 16, afirst coordinate converting part 17, a second coordinate convertingmeans 18, a servo control part 19, and the like, similar to conventionalrobots, and are incorporated in a robot control device 12 together withthe positional relationship calculating means 9 and the positionalrelationship setting and storing means 10. As shown in FIG. 2, anencoder 21 is attached to a robot arm drive motor 20. It is noted thatthe motor 20 and the encoder 21 are shown in FIG. 2 for only one axis,and those for the other axes are omitted.

The capacitance type distance sensor 5 in accordance with the presentinvention, as shown in FIG. 3, has two concentric sensor electrodes 22,23 which are located at positions spaced from each other by apredetermined distance in the Xt-axial direction which will be explainedlater, so as to constitute the capacitance type distance sensor 5 havingtwo channels which are operated separately from each other. Since theworkpiece 2 has a fillet welded joint, the sensor electrodes are formedin a conical shape in order to enhance the effective electrode area withrespect to the diameter of the electrodes. Further, the torch 13 and thecapacitance type distance sensor 5 are joined together through theintermediary of a high electrically insulating member, and accordingly,the alignment between the center axis of the welding torch 13 and therotating center axis of the rotating and sweeping means 6 and thepositioning of the capacitance type distance sensor 5 at a referencepoint can be simply made. Further, it is possible to prevent ashortcircuit of the workpiece 2 which is the other electrode of thecapacitance type distance sensor 5, by using a welding cable, a weldingwire, a circuit in a welding power source or the like.

Explanation will be hereinbelow made of operation of the welding robotconstituted as mentioned above. At first, the coordinate systems servingas the reference for the positional relationship between the torch 13and the workpiece 2 will be defined with reference to FIGS. 4 and 5.

FIG. 4 shows the first coordinate system 3 (which will be hereinbelowdenoted as "torch coordinate system) set to the torch that is attachedto the robot arm 1. In the first coordinate system 3, an action point atthe tip end of the torch 13 is used as a first coordinate systemoriginal point Ot (which will be hereinbelow denoted as "torch originalpoint Ot"), and the center axis of the torch 13 is used as the Xt-axis.The positive direction of the Xt-axis is indicated by the arrow in FIG.4. Further, a line orthogonal to the Xt-axis on a plane including theXt-axis and the rotating center axis TW of a wrist shaft at the distalend of the robot arm 1 is set as a Zt-axis. The positive direction ofthe Zt-axis is indicated by the arrow given by a broken line in FIG. 4,which is depicted as a perpendicular extended from the rotating axis TWto a point P set on the torch 13. Further, the direction orthogonal tothe Xt and Zt axes, constituting a right-hand system is defined as aYt-axis.

Next, FIG. 5 shows the second coordinate system (which will behereinbelow denoted as "workpiece coordinate system") 4 set on theobjective workpiece 2. In a condition in which the robot arm 1 ispositioned in the vicinity of a welding line on the workpiece 2, thecrossing point between the welding line and a perpendicular extending tothe welding line from a point Q at which an extension of the Xt-axis ofthe above-mentioned torch coordinate system 3 crosses the workpiece, isused as a second coordinate system original point Ow (which will behereinbelow denoted as "workpiece original point Ow). The direction ofthe welding line from the original point Ow is used as a Yw-axis, andthe direction bisecting the bevel angle of the workpiece, orthogonal tothe Yw is used as an Xw-axis. In this phase, the positive direction ofthe Yw-axis can be taken in either direction, but the positive directionof the Xw-axis is set so as to extend from the workpiece original pointto the rear surface of the workpiece 2. The remaining Zw-axis isorthogonal to the Xw- and Yw-axes, and extends in a directionconstituting a right-hand system.

At first, the capacitance type distance sensor 5 uses the fact that thecapacitance between two electrodes is inverse-proportional to thedistance between opposed electrodes, and an electrode incorporated inthe sensor is used as one of opposed electrodes while an object to bemeasured itself is used as the other electrode, between which apotential difference is given so as to constitute a circuit formeasuring the capacitance between the opposing electrodes. Thus, it ispossible to indirectly set the distance between the opposed electrodesor the distance between the capacitance type distance sensor 5 and theworkpiece 2.

The distance data measured by the capacitance type distance sensor 5 andthe phase data obtained from the rotating phase detecting means 7 aredelivered to the signal waveform processing means 8 so as to beprocessed into distance data and phase data for every feature point,which are then delivered to the positional relationship calculatingmeans 9 for calculating the positional relationship between the torchcoordinate system 3 and the workpiece coordinate system 4. The operationof the signal waveform processing means 8 and the positionalrelationship calculating means 9 will be detailed later.

The positional relationship calculated by the positional relationshipcalculating means 9 is delivered to the desired movement positioncontrol means 14 together with the reference positional relationshippreviously stored in the positional relationship setting and storingmeans 10 so as to calculate a desired movement position indicated in thetorch coordinate system 3 in order to make the calculated positionalrelationship equal to the previously set and stored reference positionalrelationship. The desired movement position indicated in the torchcoordinate system 3 is delivered to the first coordinate converting part17 together with the present position of the first coordinate system 3indicated by an orthogonal coordinate system calculated by the thirdcoordinate converting part 16, with the use of the present axispositions stored in the present position managing means 15, and isconverted into a desired movement position indicated in the orthogonalcoordinate system. Then, it is delivered to the second coordinateconverting part 18 so as to be further converted into a desired movementposition indicated in a joint coordinate system. This desired movementposition indicated in the joint coordinate system is delivered to theservo control part 19 for controlling the robot arm 1, in relation tothe axes, simultaneously.

That is, the desired movement position is compared with the present axisposition data from the above-mentioned present position managing means15, and motor rotating instructions are delivered to the motor 20incorporated in the robot arm 1. The encoder 21 attached to the motor 20delivers feed-back data to the servo control part 19 so as to constitutea servo system, and is also delivered to the present position managingmeans 15 so as to be used for updating the present position.

Explanation will be hereinbelow made of a specific method of calculatingthe positional relationship between the torch coordinate system 3 andthe workpiece coordinate system 4 with the use of the signal waveformprocessing means 8 and the positional relationship calculating means 9,with reference to the drawings.

First, FIG. 6 is a typical view showing such a case that the torchcoordinate system 3 coincides with the workpiece coordinate system 4.Referring to FIG. 6, the capacitance type distance sensor 5 measures thedistance to the workpiece in the Xt-axial direction, that is,successively measures the lengths of several arrows parallel with theXt-axis as shown in the figure while the capacitance type distancesensor 5 is rotated around the Xt-axis as a rotating center axis by therotating and sweeping means 6 (which is not shown in FIG. 6),counterclockwise as indicated by the arrow given by the broken line.During this period, the rotational phase of the capacitance typedistance sensor 5 can be simultaneously detected by the rotating phasedetecting means 7, and accordingly, a signal waveform shown by a solidline in FIG. 7 is obtained. The ordinate exhibits the distance to theworkpiece 2 measured by the capacitance type distance sensor, and theabscissa exhibits the rotating phase during measurement.

As shown in FIG. 7, the signal waveform indicating the relationshipbetween the rotating phase and the distance theoretically exhibits sucha shape that a sinusoidal wave is folded back at every other half-cycle.However, since the capacitance type distance sensor 5 measures anaveraged distance obtained from the total value of capacitances betweenthe object to be measured (workpiece 2) and the sensor electrode, andviews the workpiece as not a point but a surface, the signal waveformactually obtained resembles a sinusoidal wave having two cycle periodsper one revolution and having no points of discontinuity as indicated bya broken line in FIG. 7. However, unless otherwise specified,explanation will be made with the use of the theoretical signal waveformindicated by the solid line in FIG. 7 in the following description.

The signal waveform varies depending upon the positional relationshipbetween the torch coordinate system 3 and the workpiece coordinatesystem 4, and accordingly, the positional relationship between the torchcoordinate system 3 and the workpiece coordinate system 4 can be knownby detecting the variation in the signal waveform.

It is convenient for knowing the variation in the signal waveform to usea method in which a feature point is extracted from the signal waveform,and then the variation in the signal waveform, that is, the positionalrelationship between the torch coordinate system 3 and the workpiececoordinate system 4 is analyzed from data per every feature point. Inparticular, since it can be processed at a high speed with the use of anextreme point in the signal waveform, an extreme point in the waveformas shown in FIG. 7 is extracted from the signal waveform processingmeans 8, and the positional relationship between the torch coordinatesystem 3 and the workpiece coordinate system 4 is calculated from dataconcerning the thus obtained extreme point in the waveform, by thepositional relationship calculating means 9.

It is natural that the signal waveform contains noise, and accordingly,when the difference between the values of the successive two extremepoints is less than a predetermined value, and the difference betweenthe phases at the two extreme points is less that a predetermined value,these extreme points are not extracted as feature points in order toprevent extreme points from being erroneously extracted by noise.Further, as mentioned above, since the capacitance type distance sensoris used, a point of discontinuity is not inherently present in thesignal waveform, and accordingly, if the extreme point is a point ofdiscontinuity, the point is considered as noise, and is thereforeexcluded.

As clearly shown in FIG. 6, of extreme points, local minimum points arelocated at positions at which the left and right inner surfaces of thejoint of the workpiece 2 cross the Xt-Zt plane. These left and rightlocal minimum points are denoted as LB, RB, respectively (if the twocoordinate systems coincide with each other as shown in FIG. 7, thesepoints are denoted as LB0, RB0, respectively). Further, local maximumpoints are located front and back on the welding line on the workpiece 2in the advance direction, and these front and back local maximum pointsare denoted as FP, BP (they are denoted as FPO, BPO in FIG. 7).

From FIG. 7, if the torch coordinate system 3 and the workpiececoordinate system 4 coincide with each other, the local minimum pointsRB0, LB0, and the local maximum points FP0, BP0 have equal values,respectively, and the phases at these four extreme points divide onerevolution into four equal parts. Further, since the reference positionof the rotating phase is set in the positive direction of the Yt-axis,the phase of the point FP0 coincides with the reference position of thephase.

Next, FIG. 8 shows a condition such that the torch coordinate system 3and the workpiece coordinate system 4 are shifted from each other by adistance X in the Xt-axial direction, and further, FIG. 8 is a viewobtained by observing the typical view shown in FIG. 6 in the Yw-axialdirection. Further, a signal waveform obtained in this condition isindicated by a solid line in FIG. 9. Extreme points obtained in thiscondition are denoted as FP1, BP1, RB1, LB1. Further, a waveformindicated by a broken line in FIG. 9 is the waveform as shown in FIG. 7in such a case that the torch coordinate system 3 and the workpiececoordinate system 4 coincide with each other.

As clearly understood from FIG. 9, since the waveform is verticallyshifted in its entirety, if the torch coordinate system 3 and theworkpiece coordinate system 4 are shifted from each other in theXt-axial direction, the positional relationship between the torchcoordinate system 3 and the workpiece coordinate system 4 can becalculated by comparing the averaged value of the points FP1, BP1 whichare local maximum points in the waveform, with the averaged value of thepoints FP0, BP0 in such a case that the torch coordinate system 3coincides with the workpiece coordinate system 4.

FIG. 10 shows in such a condition that the torch coordinate system 3 andthe workpiece coordinate system 4 are shifted from each other around theZt-axis by an angle γ (that is, inclined). FIG. 10 is obtained byobserving the typical view given by FIG. 6 in the Zw-axial direction. Asignal waveform obtained in this condition is indicated by a solid linein FIG. 11. Extreme points in this condition are denoted as FP2, BP2,RB2, LB2, respectively. Further, a waveform indicated by a broken linein FIG. 11 is the waveform as shown in FIG. 7 in such a case that thetorch coordinate system 3 coincides with the workpiece coordinate system4.

As clearly understood from FIG. 11, if the torch coordinate system 3 andthe workpiece coordinate system 4 are shifted from each other around theZt-axis, a difference between the points FP2, BP2 which are the extremepoints in the waveform is present. Since the radius of the rotatingscanning is already known, the positional relationship between the torchcoordinate system 3 and the workpiece coordinate system 4 around theZt-axis can be calculated from the difference between the points FP2,BP2 and the rotating radius.

FIG. 12 shows such a condition that the torch coordinate system 3 andthe workpiece coordinate system 4 are shifted from each other by adistance Z in the Zt-axial direction. FIG. 12 is obtained by observingthe typical view given by FIG. 6 in the Yw-axial direction, similar toFIG. 8, and a signal waveform obtained in this condition is indicated bya solid line in FIG. 13. Extreme points obtained in this condition aredenoted as FP3, BP3, RB3, LB3, respectively. It is noted that the signalwaveform shown in FIG. 13 is that obtained by actual measurement withthe use of the capacitance type distance sensor 5, and a waveformindicted by a broken line is a signal waveform in such a case that thetorch coordinate system 3 coincides with the workpiece coordinate system4, and which are similarly obtained by actual measurement with the useof the capacitance type distance sensor 5.

As clearly understood from FIG. 13, if the torch coordinate system 3 andthe workpiece coordinate system 4 are shifted from each other in theZt-axial direction, a difference is present between the values of thelocal minimum points LB3, RB3 at the left and right surfaces of theworkpiece 2, and also a difference is present between the phase withwhich the right inner surface is scanned, that is, the difference RH3between the phase value of the local maxium point FP3 and the phasevalue of the local maximum point BP3, and the phase with which the leftinner surface is scanned, that is, the difference LH3 between the phasevalue of the local maximum point FP3' and the phase value of the localmaximum point BP3. It is noted that the local maximum point FP3' isobtained by measuring the position the same as that of the local maximumpoint FP3 one revolution before.

As mentioned above, although the shift between the torch coordinatesystem 3 and the workpiece coordinate system 4 in the Zt-axial directioncan be calculated with the use of either the difference between twolocal minimum points or the difference in phase between two localmaximum points, as mentioned above, since no points of discontinuity arepresent at the local maximum points in the actual signal waveformmeasured by the capacitance type distance sensor 5 as shown in FIG. 13,the detection accuracy is inferior in the calculation method using thephase. According to the present invention, the positional relationshipbetween the torch coordinate system 3 and the workpiece coordinatesystem 4 in the Zt-axial direction is calculated with the use of thedifference between the values of the local minimum points RB3, LB3.

FIG. 14 shows such a condition that the torch coordinate system 3 andthe workpiece coordinate system 4 are shifted from each other around theYt-axis by an angle β (or inclined).

FIG. 14 is obtained by observing the typical view given by FIG. 6 in theYt-axial direction, similar to FIGS. 8 and 10.

A signal waveform obtained in this condition is indicated by a solidline in FIG. 15. Extreme points obtained in this condition are denotedas FP4, BP4, RB4, LB4, respectively.

It is noted that the signal waveform shown in FIG. 15 is also obtainedby actual measurement with the use of the capacitance type distancesensor 5, similar to that shown in FIG. 13.

The results of calculation of the positional relationships explainedabove, can be obtained similarly with the use of either one of the twochannels of the capacitance type distance sensor 5. However, as clearfrom the comparison between FIG. 15 and FIG. 13, the similar waveformscan be obtained in such a case that the torch coordinate system 3 andthe workpiece coordinate system 5 are shifted from each other around theYt-axis by an angle β, and in such a case that the torch coordinatesystem 3 and the workpiece coordinate system 4 are shifted from eachother around the Zt-axial direction by a distance Z. Accordingly, inthis situation, the discrimination between such a case that the torchcoordinate system 3 and the workpiece coordinate system 4 are shiftedfrom each other around the Yt-axis and such a case that both systems 3,4 are shifted from each other in the Zt-axial direction cannot be made.In order to discriminate these two cases from each other, the twochannels of the capacitance type distance sensor 5 are used.

FIGS. 16(A) and (B) are views for explaining a calculation method forsuch a case that the torch coordinate system 3 and the workpiececoordinate system 4 are inclined around the Yt-axis by an angle 9, usingthis two channel capacitance type distance sensor 5. As mentioned above,since the capacitance type distance sensor 5 obtains a distance from thetotal value of capacitances between the object to be measured and thesensor electrode, the actual measured distance is a distance in theXw-axial direction, and accordingly, the two channels of the capacitancetype distance sensor 5 measure the distances between an arrow indicatedby a solid line and an arrow indicated by a broken line in the figure,respectively.

The distance SZ between the solid line arrow and the broken line allowin the Zw-axial direction varies in dependence upon the angle β as clearfrom FIGS. 6(A) and (B), and therefore can be obtained in such a waythat the capacitance type distance sensor 5 is rotated and swept, andshifts in the Zt-axial direction are calculated respectively for the twochannels so as to take a difference between the respective results ofthe calculation.

FIG. 16(B) is an enlarged view illustrating the electrode part of thecapacitance type distance sensor 5 shown in FIG. 16(A). Referring toFIG. 16(B), the first electrode 22 and the second electrode 23 measurethe distance from points S1, S2 to the workpiece 2 as shown in thefigure, these points S1, S2 being spaced from each other by a distanceSX in an Xt'-axial direction which is parallel with the Xt-axis. Whenthe cross point between a straight line which is drawn from the point S1in the Xt'-axial direction, and the broken line arrow which indicatesthe distance measured by the second electrode 23 is denoted as S', theangle β, that is, the positional relationship between the torchcoordinate system 3 and the workpiece coordinate system 4 around theYt-axis (that is, the inclination of the capacitance type distancesensor 5) can be obtained by calculating the inverse sine function ofthe division of SX by SZ since an angle S1, S2, S' of the right angletriangular S1, S2, S' is β.

Finally, a signal waveform which is obtained when the torch coordinatesystem 3 and the workpiece coordinate system 4 are shifted from eachother by an angle α around the Xt-axis is shown by a solid line in FIG.17. Extreme points obtained in this condition are denoted as FPS, BP5,RB5, LB5, respectively. Further, the signal waveform obtained in such acase that torch coordinate system 3 and the workpiece coordinate system4 coincide with each other is indicated by a broken line.

As clearly understood from FIG. 17, the phases at the points FP5, BP5which are local maximum points in the waveform and at the points RB5,LB5 which are local minimum points, with respect to the referenceposition are shifted as a whole if the torch coordinate system 3 and theworkpiece coordinate system 4 are shifted from each other around theXt-axis.

FIG. 18 is a view which shows that the phases at the extreme points FP,BP, LB, RB, in such a case that the torch coordinate system 3 and theworkpiece coordinate system 4 are shifted from each other in bothXt-axial and Zt-axial directions, and also around the Xt-axis, Yt-axisand Zt-axis, are given on the rotating and scanning orbit of thecapacitance type distance sensor 5. In such a case, the positionalrelationship to be obtained is the shift value around the Xt-axis, thatis, the angle a between the welding line Yw and the Yt-axis.

As mentioned above, if the shift value α around the Xt-axis can beobtained, the positional relationship around the Xt-axis can be solelycalculated, irrespective of the positional relationship between thetorch coordinate system 3 and the workpiece coordinate system 4.

Referring to FIG. 18, the straight line extending between the localminimum points RB, LB and indicated by the broken line in the figure andthe straight line extending between the points FP, BP, that is, theYw-axis are always orthogonal to each other on the rotating and scanningorbital plane, and this fact can be understood from the consideration ofthe shape of the workpiece and the definition of the coordinate systemsas well as from the geometrical consideration of the rotating andscanning orbit.

Accordingly, the angle a can be calculated in a direction which isindicated by the averaged value B between the phase at the point RB withrespect to the reference position and the phase at the point LB withrespect to the reference position, or in a direction orthogonal to adirection indicated by the averaged value P between the phase at thepoint FP with respect to the reference position and the phase at thepoint BP with respect to the reference position, and with thiscalculation method, the positional relationship around the Xt-axis canbe easily calculated.

With the above-mentioned operation, of 6 components which give thepositional relationship between the torch coordinate system 3 and theworkpiece coordinate system 4, five components can be easily calculatedby rotating and sweeping the capacitance type distance sensor 5.

As already mentioned above, by moving the robot arm 1 in such a way thatthe thus calculated positional relationship coincides with a desiredpositional relationship previously set and stored in memory, theworkpiece whose direction and position are both unknown can beautomatically detected, and the robot arm 1 or the torch 13 can bepositioned at a desired target position or torch posture.

As to the positional relationship in the Yt-axial direction or thepositional relationship of the welding line, as the remaining onecomponent which gives the positional relationship, it is satisfactory toalways set zero for the detection of the start point, and if a valueother than zero is given, the robot arm 1 is moved to a position shiftedfrom the present position in the direction of the welding line. With therepetitions of this procedure, the above-mentioned operation issuccessively carried out so that the robot arm 1 can be moved so as toautomatically trace the welding line while a desired target position andtorch posture are maintained.

This does mean that the component in the Yt-axial direction among thesix components indicating the positional relationship between the torchcoordinate system 3 and the workpiece coordinate system 4 is a variablewhich determines the direction and the speed with which the welding lineis traced. By changing this value under the robot operator'sinstructions, the direction of the welding line and the welding speedcan be arbitrarily selected, or adjusted.

Further, if the curvature of the welding line, the operating speeds ofthe shafts of the robot arms and the like are calculated from thepositional relationship between the torch coordinate system 3 and theworkpiece coordinate system 4 which has been obtained by theabove-mentioned calculation method so that the value of the component inthe Yt-axial direction is increased and deceased in dependencethereupon, the welding speed can be optimumly adjusted to fit theoccasion.

However, in such a case that the robot arm is continuously operatedtracing the welding line, an error occurs in the result of thecalculation of the positional relationship made by the above-mentionedcalculation method. This is caused because the above-mentionedcalculation method is made by estimating that the robot arm isstationary, or more specifically, the positional relationship betweenthe torch coordinate system 3 and the workpiece coordinate system 4 doesnot vary within the one rotation scanning time of the capacitance typedistance sensor 5. The faster the speed at which the welding line istraced, the larger the difference between this estimation and the actualcondition, and accordingly, the error increases. This fact causesrestraint to the allowable speed of tracing the welding line.

In order to reduce this error, it is effective to shorten the rotatingand scanning period of the capacitance type distance sensor 5 so thatthe time per one revolution scanning is shortened in order that thecontinuous operation of the robot arm is negligible. However, actually,the response frequency of the capacitance type distance sensor 5 andvarious processing times have limits, and further, the rotating andsweeping period which can be realized also has a limit.

Thus, according to the present invention, by hypothetically creating acondition in which the positional relationship is stationary, fromactual data in such a condition that the positional relationship betweenthe torch coordinate system 3 and the workpiece coordinate system 4varies within one rotating and scanning time of the capacitance typedistance sensor 5, this error can be reduced, and explanation will bemade of a specific method therefor with reference to the drawings.

In FIG. 19, a signal waveform obtained in such a case that the robot armis moved at a constant speed in the Xt-axial direction from a conditionin which the torch coordinate system 3 and the workpiece coordinatesystem 4 are shifted from each other in the Xt-axial direction to acondition in which both coordinate systems coincide with each other,during one revolution scanning of the capacitance type distance sensor5, is indicted by a solid line, and extreme points in this condition aredenoted as FP6, RB6, BP6, LB6, respectively.

Further, a signal waveform obtained in such a case that transition ismade while a condition in which the torch coordinate system 3 and theworkpiece coordinate system 4 coincide with each other is maintained asit is, is indicated by a broken line, and extreme points in this caseare denoted as FP0, RB0, BP0, LB0, respectively.

Then, the difference between the value of one local maximum point FP6and the value of the same local maximum point FP6' one revolution beforeis divided by a phase difference PH6 between both extreme points so asto obtain a displacement DDXt per unit phase, and the DDXt is multipliedby phase differences between the point FP6 and the other points RB6,BP6, LB6 located between both local maximum points so as to obtaincompensating values for these extreme points. Accordingly, thecompensation is made for the respective values.

Further, with the use of a displacement Xt in the Xt-axial direction perone revolution scanning obtained form the above-mentioned displacementDDXt per unit pahse, compensating values for the phases of the localpoints PB6, LB6 are calculated, and these phases are compensated.

Thus, an error which is caused by moving the robot arm in the Xt-axialdirection during one revolution scanning of the capacitance typedistance sensor 5 can be compensated.

Similarly, as to such a case that the robot arm is moved at a constantspeed in the Zt-axial direction during one revolution scanning of thecapacitance type distance sensor 5, with the use of such a fact that astraight line extending between the local minimum points RB, LB and astraight line extending between the local maximum points FP, BP areorthogonal to each other as explained with reference to FIG. 18, adisplacement in the Zt-axial direction during one revolution scanning isobtained, and accordingly, the phases at the extreme points can becompensated with the use of thus obtained displacement.

That is, in such a case that the robot arm is moved in the Zt-axialdirection during one revolution scanning, the straight line extendingbetween the above-mentioned local minimum points RB, LB does not becomeorthogonal to the straight line extending between the local maximumpoints FP, BP. Accordingly, a displacement in the Zt-axial direction perrevolution scanning is obtained from a difference between an angledefined by both straight lines and a right angle and a rotating scanningradius, and with the use of the thus obtained displacement, compensationvalues for phases at the extreme points are calculated, similar to thecase in which the robot arm is moved in the Xt-axial direction, therebyit is possible to compensate the respective phases.

Thus, an error caused by the movement of the robot arm in the Zt-axialdirection during one revolution scanning of the capacitance typedistance sensor 5, can be compensated.

In such a case that the robot arm is moved while the arm actually tracesthe welding line, the movement of the robot arm during one revolutionscanning of the capacitance type distance sensor 5 is not alwaysconstant. However, since the rotating and scanning period of thecapacitance type distance sensor 5 is short, and since the onerevolution time is very short, no practical problem occurs if thecompensation is made with such consideration that the robot arm is movedat a constant speed during one revolution scanning.

As mentioned above, the positional relationship calculating means 9 canprecisely calculate the positional relationship between the torchcoordinate system 3 and the workpiece coordinate system 4.

The comparison between the teaching time of the welding robot accordingto the present invention and that of a conventional method using amanipulating box is shown in Table 1.

                                      TABLE 1    __________________________________________________________________________    WORKER    A     B  C   D   E    AVERAGE    SKILL     UPPER MIDDLE LOWER    __________________________________________________________________________    TEACHING TIME              230   240                       259 280 285  244    BY INVENTION    CONVENTIONAL              564   752                       855 1157                               1240 860    TEACHING TIME    (sec)    RATE TO   40.8  31.9                       30.3                           24.2                               23.0 28.4    CONVENTIONAL    TEACHING    (sec)    __________________________________________________________________________

The teaching was carried out for a workpiece shown in FIG. 20, usingcircle marks as teaching points. In this teaching, it was designatedthat the torch angle with respect to a horizontal plane was set to 45deg., and the advancing or backing angle with respect to the weldingline was set to zero. The number of teaching points was 22, and thewelding length was 810 mm at that time.

As clear from Table 1, the teaching time with the use of the weldingrobot according to the present invention can be reduced by about 30% incomparison with that of the conventional method. Further, even abeginner can carry out a teaching in a time substantially equal to thattaken by a skilled worker, irrespective of the skill of the worker. Inview of this fact, it is possible to obtain excellent technical effectsand advantages.

According to the present invention as mentioned above, the capacitancetype distance sensor 5 is rotated and swept by the rotating and sweepingmeans 6, a feature point is extracted from a signal waveform by thesignal waveform processing means 8 with the use of distance data to theobjective workpiece 2 and rotating phase data, the positionalrelationship between the torch coordinate system 3 and the workpiececoordinate system 4 is calculated from the distance data and rotatingphase data per the thus extracted feature point by the positionalrelationship calculating means 9, and the robot arm 1 is moved by therobot control means in such a way that the thus calculated positionalrelationship coincides with a previously set and stored positionalrelationship. Accordingly, the robot arm 1 or the torch 13 can beautonomously moved so as to have a previously set and stored positionalrelationship, that is, it can be moved to a desired welding torchposition or posture.

Although explanation has been made of such a structure that thecapacitance type distance sensor 5 is previously attached to therotating and sweeping means 6, and accordingly, it is attached to thewelding torch 13 together with the rotating and sweeping means 6,according to the present invention, a part of members constituting thetorch 13, such as a chip adapted to be rotated together with theelectrode rod of the capacitance type distance sensor 5 can be replacedso that an electrode rod rotating mechanism belonging to the torch canbe used as the rotating and sweeping means 6.

Further, although explanation has been made of an encoder that is usedas the rotating phase detecting means 7, according to the presentinvention, it goes without saying that the rotating phase detectingmeans 7 can be realized by precisely rotating the rotating and sweepingmeans 6 so as to measure the time.

Further, although explanation has been made of a compensating method forsuch a case that the robot arm is continuously moved in the Xt-axialdirection and the Zt-axial direction, according to the presentinvention, compensation can be made for other positional relationshipsuch that the robot arm is continuously moved around each of the axesalong with the similar consideration so that each of the extreme pointscan be compensated with the use of the difference between the value ofan arbitrary extreme point and the value of the extreme pointsubstantially one revolution before. Further, as already mentioned,although the above-mentioned compensation is made by use ofdisplacements per revolution scanning in several directions, if thepositional relationship calculated by estimating that the positionalrelationship is stationary, is subtracted from the positionalrelationship which has been calculated one revolution scanning before soas to approximately calculate movements per revolution, the positionalrelationship is again calculated by compensating the values of theextreme points and the phases at these points with the use of the thusapproximately calculated movements, and accordingly, it is possible toreduce errors.

Further, according to the present invention, instead of the capacitancetype distance sensor, another type of a noncontact distance sensor suchas a laser type distance sensor can be used.

Industrially Usability

The welding robot according to the present invention, as mentionedabove, can be suitably used for easily and efficiently carrying out ateaching work for a workpiece which has a complicated shape so as torequire several teaching points, or for a workpiece which requiresseveral operation programs due to mutikind and small quantityproduction, with a high degree of accuracy by a worker who has noteaching skill.

We claim:
 1. A welding robot for welding an objective workpiece,comprising:a robot arm having a distal end defining the origin of afirst coordinate system; a noncontact distance sensor attached to thedistal end of said robot arm, for measuring a distance to the objectiveworkpiece and delivering distance data; a rotating and sweeping meansconnected to said robot arm and having a rotating center axiscorresponding to the first coordinate system, for rotating and sweepingsaid noncontact distance sensor; a rotating phase detecting means fordetecting a rotating phase of said noncontact distance sensor anddelivering rotating angle phase data; a signal waveform processing meansoperatively connected to said noncontact distance sensor and saidrotating phase detecting means for forming a signal waveform obtained bythe distance data and the rotating angle phase data, extracting anextreme feature point from the signal waveform, and delivering distancedata and rotating angle phase data per feature point; a relationshipcalculating means operatively connected to said signal waveformprocessing means for calculating an actual relationship between thefirst coordinate system, and a second coordinate system having an origindefined on the objective workpiece, from the distance data and therotating angle phase data delivered from said signal waveform processingmeans; a relationship setting and storing means for presetting andpre-storing a reference relationship between the first coordinate systemand the second coordinate system; and a robot control means operativelyconnected to said relationship calculating means and said relationshipsetting and storing means for moving said robot arm so that the actualrelationship between the first coordinate system and the secondcoordinate system, calculated by said relationship calculating means,coincides with the reference relationship between the first coordinatesystem and the second coordinate system.
 2. A welding robot as set forthin claim 1, wherein said noncontact distance sensor is a capacitancetype distance sensor for measuring a distance using a capacitancebetween an electrode part of said sensor and the objective workpiece. 3.A welding robot as set forth in claim 2, wherein said capacitance typedistance sensor has a conical electrode part.
 4. A welding robot as setforth in claim 2, wherein said capacitance type distance sensor has aplurality of sensor electrodes which are coaxially arranged and whichare separately operated.
 5. A welding robot as set forth in claim 2,wherein said capacitance type distance sensor is attached to saidrotating and sweeping means through an intermediate electricallyinsulating member.
 6. A welding robot as set forth in claim 1, whereinsuccessive extreme points having a phase therebetween that is lower thana predetermined angle are not extracted as the feature points by saidsignal waveform processing means.
 7. A welding robot as set forth inclaim 1, wherein two successive extreme points having a value differenceless than a predetermined value are not extracted as the feature pointsby said signal waveform processing means.
 8. A welding robot as setforth in claim 1, wherein an extreme point having a distance datadelivered by said noncontact distance sensor out of a predeterminedrange is not extracted as a feature point by said signal waveformprocessing means.
 9. A welding robot as set forth in claim 1, whereinsaid relationship calculation means compensates for a difference in thedistance data and the rotating angle phase data at a plurality ofsuccessive feature points, and thereafter, calculates a positionalrelationship between the first coordinate system and the secondcoordinate system.
 10. A welding robot as set forth in claim 1, whereinsaid relationship calculating means compensates for distance data androtating angle phase data at a plurality of feature points as a resultof a prior actual calculated relationship, and thereafter calculates theactual relationship between the first and second coordinate systems. 11.A welding robot as set forth in claim 1, wherein said relationshipcalculating means adjusts the actual relationship in a direction of awelding line using a calculation result of a prior actual relationshipbetween the first coordinate system and the second coordinate system.12. A welding robot as set forth in claim 1, further comprising awelding torch mounted at the distal end of said robot arm; wherein saidnoncontact distance sensor and said rotating and sweeping means areremovably attached to said welding torch.
 13. A welding robot as setforth in claim 1, wherein said rotating and sweeping means comprises anelectrode rod rotating means for a rotary arc welding torch attached tosaid robot arm, and said noncontact distance sensor comprises a contactchip of said rotary arc welding torch.